package com.cleaningcloud.erp.service.impl;

import com.cleaningcloud.erp.domain.MaterialsBI;
import com.cleaningcloud.erp.mapper.MaterialsBIMapper;
import com.cleaningcloud.erp.service.IMaterialsBIService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.Map;

/**
 * @className 物资报表BI业务实现类
 * @description //TODO
 * @author Shaw
 * @date: 2025-03-06 16:33
 * @param: //TODO
 */
@Service
public class MaterialsServiceBIImpl implements IMaterialsBIService {

    //系统报表映射
    @Autowired
    private MaterialsBIMapper materialsBIMapper;

    /**
     * @Author Shaw
     * @Description 获取三级仓库金额
     * @date: 2025-04-09 12:04
     * @param: //TODO
     */
    @Override
    public Map<String, Object> getMaterialsBIWareAmount(MaterialsBI materialsBI) {
        return materialsBIMapper.getMaterialsBIWareAmount(materialsBI);
    }

    /**
     * @Author Shaw
     * @Description 根据商品类型获取TO8商品数量/金额（总仓）
     * @date: 2025-03-06 16:37
     * @param: typeVal(1按数量2按金额)
     */
    @Override
    public List<MaterialsBI> getMaterialsBICommodityTypeNumberByGeneralWare(MaterialsBI materialsBI) {
        return materialsBIMapper.getMaterialsBICommodityTypeNumberByGeneralWare(materialsBI);
    }

    /**
     * @Author Shaw
     * @Description 根据商品类型获取TO8商品数量/金额（项目仓）
     * @date: 2025-03-06 16:37
     * @param: typeVal(1按数量2按金额)
     */
    @Override
    public List<MaterialsBI> getMaterialsBICommodityTypeNumberByProjectWare(MaterialsBI materialsBI) {
        return materialsBIMapper.getMaterialsBICommodityTypeNumberByProjectWare(materialsBI);
    }

    /**
     * @Author Shaw
     * @Description 根据商品类型获取TO8商品数量/金额（个人仓）
     * @date: 2025-03-06 16:37
     * @param: typeVal(1按数量2按金额)
     */
    @Override
    public List<MaterialsBI> getMaterialsBICommodityTypeNumberByPersonWare(MaterialsBI materialsBI) {
        return materialsBIMapper.getMaterialsBICommodityTypeNumberByPersonWare(materialsBI);
    }
}
